#include ".\imageparser.h"

GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR           gdiplusToken;



ImageParser::ImageParser(void)
{
	// Initialize GDI+.
	GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
}

ImageParser::~ImageParser(void)
{
	GdiplusShutdown(gdiplusToken);
}

HBITMAP ImageParser::LoadImage(LPCTSTR lpszFileName)
{

	Bitmap bmpObj(L"1.png",FALSE);
	Color clrTrans(255,0,255);
	HBITMAP hbitmap = NULL;
	Status s = bmpObj.GetHBITMAP(clrTrans,&hbitmap);
	return hbitmap;
}

HICON ImageParser::LoadIcon(LPCTSTR lpszFileName)
{

	Bitmap bmpObj(L"1.png",FALSE);
	HICON hIcon = NULL;
	Status s = bmpObj.GetHICON(&hIcon);
	return hIcon;
}